<form name="invoice_form" class="ui-dialog-content" style="width: 600px;">
    <table width="100%">
        <tbody>
            <tr>
                <td align="right" class="form-cell w88 pt16" valign="top">
                    <em class="c-red">*</em>发票号码
                </td>
                <td class="pt12" valign="top">
                    <input select2  id="invoice_no" name="invoice_no" ng-model="data.item.invoice_no" select2-model="ddlSeletedInvoice"
                           config="data.ddlConfigInvoice" class="form-control" required maxlength="50"  type="text"/>
                    <p role="alert"
                       ng-show="(invoice_form.invoice_no.$touched || invoice_form.$submitted) && invoice_form.invoice_no.$error.required"
                       class="error ng-hide c-red lh30">
                        请填写发票号码</p>

                </td>
            </tr> 
            <tr>
                <td align="right" class="form-cell w88 pt16" valign="top"><em class="c-red">*</em>特批类型</td>
                <td class="pt12" valign="top">
                    <div ui-combobox data="data.categoryList" text-field="value" value-field="id" name="category" required
                         ng-model="data.item.category" changed="data.changeCategory(data)"></div>
                    <input id="category_temp"  name="category_temp" data-ng-model="data.item.category_temp" style="display: none"/>
                    <span role="alert"
                          ng-show="(invoice_form.$submitted || invoice_form.category.$touched) && invoice_form.category.$error.required"
                          class="error ng-hide c-red lh30">特批类型不能为空</span>                     
                </td>
            </tr>

            <tr>
                <td align="right" class="form-cell w88 pt16" valign="top"><em class="c-red">*</em>
                    兑现责任人
                </td>
                <td class="pt12" valign="top">                    
                    <input select2  id="promise_fulfil_principle"  name="promise_fulfil_principle" data-ng-model="data.item.promise_fulfil_principle" select2-model="ddl2Principle"
                           config="data.ddlConfigPrinciple" required class="form-control"/>
                    <span role="alert"
                          ng-show="(invoice_form.$submitted || invoice_form.promise_fulfil_principle.$touched) && invoice_form.promise_fulfil_principle.$error.required"
                          class="error ng-hide c-red lh30">兑现责任人不能为空</span>                     
                </td>
            </tr>            
            <tr>
                <td align="right" class="form-cell w88 pt16" valign="top"><em class="c-red">*</em>承诺日期</td>
                <td class="pt12">
                    <input type="text" class="input-date fl form-control" style="width:100%"
                           ui-date format="yyyy-MM-dd" required name="promise_fulfil_time" ng-model="data.item.promise_fulfil_time" placeholder="">
                    <span role="alert"
                          ng-show="(invoice_form.$submitted || invoice_form.promise_fulfil_time.$touched) && invoice_form.promise_fulfil_time.$error.required"
                          class="error ng-hide c-red lh30">承诺日期不能为空</span> 
                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell w88 pt16" valign="top">兑现日期</td>
                <td class="pt12">
                    <input type="text" class="input-date fl form-control" style="width:100%"
                           ui-date format="yyyy-MM-dd" name="actual_fulfil_time" ng-model="data.item.actual_fulfil_time" placeholder="">

                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell w50 pt16" valign="top">备注</td>
                <td class="pt12"><textarea id="comment" name="comment" data-ng-model="data.item.comment" class="textarea" maxlength="500"> </textarea></td>
            </tr>            
            <tr>
                <td align="right" class="form-cell w88 pt16" valign="top">附件</td>
                <td class="pt12">
                    <div id="fileupload" class="fileinput-button btn">
                        <span class="f13">上传附件</span>
                        <input type="file" name="file" />                        
                    </div>
                    <div class="c-red f13" style="clear:both;display: none;" id="fileupload_tip">上传中……</div>
                    <div class="c-red f13" style="clear:both;display: none" id="fileupload_error">上传失败</div>                    
                    <input type="hidden" id="fileupload_url" value="{{data.attachmentList}}" />
                    <div>
                        <div style="line-height: 28px;height: 28px;display: inline-block;margin-right: 20px" ng-repeat="file in data.attachmentList">
                            <a target="_blank" href="{{ file.document_path}}">{{ file.document_name}}</a>
                            <a class="glyphicon glyphicon-trash" title="删除附件" href="javascript: void(0)" ng-click="data.delAttachment(data,file.document_id)"></a>
                        </div>                        
                    </div>

                </td>
            </tr>
        </tbody>
    </table>
</form>